<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="Keywords" content="花言APP,花言软件,花言应用，深圳花言" />
    <meta name="Description" content="高颜值一对一私密视频聊天" />
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
    <title>附近视频交友</title>
    <script src="/static/js/common/flexible.js"></script>
    <script src="/static/js/common/jquery-1.11.1.min.js"></script>

    <style>
        *{margin: 0;padding: 0}
        div{width: 10rem;height: auto;position: relative;background: #FEECF8}
        div>img{width: 100%;height: auto}
        div>a{position: fixed;width:6rem;height:1rem;line-height: 1rem;background: #2dc1e8;color: #fff;font-size: 0.5rem;border-radius: 0.5rem;bottom: 0.5rem;left: 50%;margin-left: -3rem;text-align: center;text-decoration: none;z-index: 99;}
    </style>
</head>
<script>
    var domain = document.domain;
    if(domain.indexOf("local")>-1 || domain.indexOf("test")>-1 ){
        console.log("我是本地")
    }else{
        $("head").append('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />');
    }
</script>
<body>
<script src="/static/js/Monitor.js"></script>
<div>
    <img src="/static/img/iosstep.jpg" alt="">
    <!--<a href="">点击下载花言</a>-->
    <a id="downloadButton" style="cursor: pointer">点击下载花言</a>
</div>
<script type="text/javascript" src="//www.shareinstall.net/js/page/shareinstall-h5.min.js"></script>
<script type="text/javascript">
    var data = ShareInstall.parseUrlParams();//shareinstall.js中提供的工具函数，解析url中的所有查询参数
    var button = document.getElementById("downloadButton");
    var domain = document.domain;
    // 测试环境
    data.appkey="F2BKF26FKAB2EK";
    new ShareInstall({
        appKey : 'F2BKF26FKAB2EK',
        onready : function() {
            // var m = this;
            button.style.visibility = "visible";
            /*在app已安装的情况尝试拉起app*/
            // m.schemeWakeup();
            /*用户点击某个按钮时(假定按钮id为downloadButton)，安装app*/
            // button.onclick = function() {
            //     // 测试环境
            //     if(domain.indexOf('test') > -1) {
            //       button.setAttribute("href","https://fir.im/meishuo?utm_source=fir&utm_medium=qr&release_id=5be6c6c6548b7a4737274e48")
            //         //window.location.href="https://fir.im/meishuo?utm_source=fir&utm_medium=qr&release_id=5be6c6c6548b7a4737274e48";
            //     } else {
            //       button.setAttribute("href","itms-services:///?action=download-manifest&url=https://cdn.meishuo.mobi/manifest.plist");
            //         //window.location.href="itms-services:///?action=download-manifest&url=https://cdn.meishuo.mobi/manifest.plist";
            //     }
            //     button.click();
            //     // m.wakeupOrInstall();
            //     // return false;
            // }
            if(domain.indexOf('test') > -1 || domain.indexOf('local') > -1) {
                button.setAttribute("href","https://fir.im/meishuo?utm_source=fir&utm_medium=qr&release_id=5be6c6c6548b7a4737274e48")
            } else {
                button.setAttribute("href","itms-services:///?action=download-manifest&url=https://cdn.meishuo.mobi/manifest.plist");
            }

        }
    }, data);

</script>

</body>